package com.dbgs.qqui;
import android.app.Activity;
import android.content.Context;

import com.qmuiteam.qmui.widget.dialog.QMUITipDialog;
public class Tips {
    String[] listItems = new String[]{
            "Loading 类型提示框",
            "成功提示类型提示框",
            "失败提示类型提示框",
            "信息提示类型提示框",
            "单独图片类型提示框",
            "单独文字类型提示框",
            "自定义内容提示框"
    };
    void show(int type){
        final QMUITipDialog tipDialog;

        switch (type){
            case 0:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING)
                        .setTipWord("正在加载")
                        .create();
                break;
            case 1:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setIconType(QMUITipDialog.Builder.ICON_TYPE_SUCCESS)
                        .setTipWord("发送成功")
                        .create();
                break;
            case 2:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setIconType(QMUITipDialog.Builder.ICON_TYPE_FAIL)
                        .setTipWord("发送失败")
                        .create();
                break;
            case 3:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setIconType(QMUITipDialog.Builder.ICON_TYPE_INFO)
                        .setTipWord("请勿重复操作")
                        .create();
                break;
            case 4:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setIconType(QMUITipDialog.Builder.ICON_TYPE_SUCCESS)
                        .create();
                break;
            case 5:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setTipWord("请勿重复操作")
                        .create();
                break;
            case 6:
                tipDialog = new QMUITipDialog.CustomBuilder(getContext())
                        .setContent(R.layout.tipdialog_custom)
                        .create();
                break;
            default:
                tipDialog = new QMUITipDialog.Builder(getContext())
                        .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING)
                        .setTipWord("正在加载")
                        .create();
        }
    }
    private Context getContext() {
        return activity;
    }


    Activity activity;
    private Activity getActivity() {
        return activity;
    }
}
